﻿// copyright jyz.2024


#include "AuraInputConfig.h"

const UInputAction* UAuraInputConfig::FindAttributeInfoForTag(const FGameplayTag& InputTag, bool bLogNotFound) const
{
	const FAuraInputAction* InputData = AbilityInputActions.FindByPredicate([InputTag](const FAuraInputAction& OtherInfo)
	{
		//return InputTag == OtherInfo.InputTag; or
		return InputTag.MatchesTagExact(OtherInfo.InputTag);
	});
	if(InputData&&InputData->InputAction)
	{
		return InputData->InputAction;
	}
	if(bLogNotFound)
	{
		UE_LOG(LogTemp,Error,TEXT(" 在[%s]没有找到 [%s] InputAction"),*GetNameSafe(this),*InputTag.ToString())
	}
	return nullptr;
}
